<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>Gitea</title>
    <script type="text/javascript" src="jv.js"></script>
    <script type="text/javascript" src="jquery.3min.js"></script>

    <style type="text/css">
        html, body {
            height: 100%;
            margin: 0;
            padding: 0;
        }

        body, iframe {
            display: flex;
            flex-direction: column;
            flex: 1;
        }

        iframe {
            border: none;
        }

        .loaded {
            opacity: 1;
        }
    </style>
</head>
<body>


<script type="application/javascript">

    $.ajaxSetup({crossDomain: true, xhrFields: {withCredentials: true}})

    $(function () {
        var json = jv.query2Json(window.location.href);
        $.ajax({
            crossDomain: true,
            xhrFields: {withCredentials: true},
            type: 'POST',
            url: "http://127.0.0.1:8002/open/autoLogin?system=jenkins",
            headers: {token: json.token},
            success: function (res, status, xhr) {
                console.log(xhr.status);

                if (xhr.status === 282) {
                    window.location = "http://127.0.0.1:508"
                }
            }
        });
    });
</script>
</body>
</html>